package org.csu.newpetstoreback.service;

import org.csu.newpetstoreback.common.CommonResponse;
import org.csu.newpetstoreback.entity.Account;
import org.csu.newpetstoreback.vo.AccountVO;
import org.csu.newpetstoreback.vo.OrderVO;

import java.util.List;

public interface AccountService {
    CommonResponse<AccountVO> getAccount(String username,String password);
    CommonResponse<AccountVO> getAccount(String username);
    CommonResponse<Account> getAccountByName(String username);//判断是否用户名已被注册
    CommonResponse<AccountVO> getAccountByPh(String phone);
    CommonResponse<Account> isPhoneIn(String phone);//判断电话是否存在
    CommonResponse<AccountVO> insertAccount(String username,String password,String email);
    CommonResponse<Account> updateAccount(AccountVO accountVO);
    //获取该用户所有订单
    CommonResponse<List<OrderVO>> getOrders(String username);
}
